<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>箭头函数的基本语法</title>
  </head>

  <body>

  </body>
  <script>
    /* 
    ES6箭头函数的基本语法
    */
    //1.ES6箭头函数的基本用法
    let sum = (arg1, arg2) => {
      return arg1 + arg2;
    }
    console.log(sum(1, 2)); //3


    //2.ES5普通函数的使用
    function fn(a, b) {
      return a * b
    }
    console.log(fn(10, 20)); //200
  </script>

</html>